#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
char* delete(char*s1,char*s2)
{
	int len1 = strlen(s1);
	int len2 = strlen(s2);
	char s3[100]={0};
	int i, j,n=0;
	for (i = 0; i < len1; i++)
	{
		for (j = 0; j < len2; j++)
		{
			if (s1[i] == s2[j])
			{
				break;
			}
		}
		if (j == len2)
		{
			s3[n] = s1[i];
			n++;
		}
	}
	int len3 = strlen(s3);
	char* ret = (char*)calloc(len3+1, sizeof(char));
	i = 0;
	n = 0;
	while (s3[i] == ' ')
	{
		i++;
	}
	for (; i < len3; i++)
	{
		ret[n] = s3[i];
		n++;
		if (s3[i + 1]==' ')
		{
			while (s3[i+2]==' ')
			{
				i++;
			}
		}
	}
	return ret;
}
int main()
{
	char s1[100] = { 0 };
	char s2[100] = { 0 };
	gets(s1);
	gets(s2);
	char* p = delete(s1, s2);
	printf("%s", p);
	free(p);
	p = NULL;
	return 0;
}